﻿using AutoMapper;
using B.WMS.GoodsDto.Input;
using B.WMS.GoodsDto.Output;
using B.WMS.InWareHouseManagement;
using B.WMS.InWareHouseManagementDtos;
using B.WMS.WMSDtos;
using B.WMS.WMSDtos.Inventory.OutPut;
using B.WMS.WMSDtos.Snventory;
using B.WMS.WMSDtos.User;
using B.WMS.WMSDtos.Warehousety;
using B.WMS.WMSEntities.GoodsEntities;
using B.WMS.WMSEntities.Snventory;
using B.WMS.WMSEntities.User;
using B.WMS.WMSEntities.Warehousety;
using System.Collections.Generic;


namespace B.WMS;

public class WMSApplicationAutoMapperProfile : Profile
{
    public WMSApplicationAutoMapperProfile()
    {
        /* You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. */
        
        CreateMap<CreateWareHouseInput, InWareHouseModel>();
        CreateMap<InWareHouseModel, GetWareHouseOutput>();
        //货品
        CreateMap<Goods,GoodsOutput>().ReverseMap();
        CreateMap<Goods,CreateWVendorInput>().ReverseMap();
        CreateMap<Goods,GoodsCreateDto>().ReverseMap();
        CreateMap<Units,CreateUnitInput>().ReverseMap();
        CreateMap<Goodstype,CreateGoodsTypeInput>().ReverseMap();
        CreateMap<Goods,CreateGoodsInput>().ReverseMap();
        CreateMap<Units,CreateUnitDto>().ReverseMap();
        CreateMap<Goodstype,CreateGoodsTypeDto>().ReverseMap();
        CreateMap<CreateGoodsInput, GoodsCreateDto>();
        CreateMap<CreateAllocateInput,WAllocate>().ReverseMap();
        //CreateMap<string,string>().ReverseMap();
        //仓库
        CreateMap<WarehouseDto,Warehouse>().ReverseMap();
        CreateMap<CreateUpdateWarehouseDto,Warehouse>().ReverseMap();

        CreateMap<LocationDto,Location>().ReverseMap();
        CreateMap<CreateUpdateLocationDto,Location>().ReverseMap();

        CreateMap<DetailModel, DetailModelDto>().ReverseMap();
        CreateMap<CreateUpdateDetailDto, DetailModel>().ReverseMap();

        CreateMap<ReviewModelDto, ReviewModel>().ReverseMap();
        CreateMap<CreateUpdateReviewDto, ReviewModel>().ReverseMap();

 

        CreateMap<InWareHouseModel, GetWareHouseOutput>();
        CreateMap<CreateWareHouseInput, InWareHouseModel>();
        CreateMap<UserDTO, UserModel>();
        CreateMap< UserModel,GetUserDTO>();
        CreateMap< CreateWVendorInput,WVendor>().ReverseMap();
        CreateMap<Goods, GetGoodsDto>().ReverseMap();
        
        
        CreateMap<IOWareHouseRecordModel, Out_InWarehouseOutPut>().ReverseMap();

        CreateMap<Warehouse, SelectWareHouseDto>();
        CreateMap<Location, SelectLocationDto>();
        CreateMap<IOWareHouseRecordDto, IOWareHouseRecordModel>();
        CreateMap<IOWareHouseRecordModel, IOWareHouseRecordDto>();
        CreateMap<Goods, SelectGoodsDto>();
        CreateMap < WMSEntities.WMSUpdateLogs.WMSUpdateLog, WMSUpdateLogDto>();

        CreateMap< WMSEntities.WMSUpdateLogs.WMSUpdateLog, WMSUpdateLogDto>();
    }
}
